-
Notifications
You must be signed in to change notification settings - Fork 5
feat[law-word]:법령 검색 기능 추가 #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds law term search functionality to the AI lawyer application, expanding the existing precedent and law search capabilities with a new law-word feature.
- Implements law term definition lookup with caching capability
- Updates security configuration to expose new API endpoints
- Enhances existing controllers with proper API documentation
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| SecurityConfig.java | Adds public access for precedent, law, and law-word API endpoints |
| PrecedentService.java | Refactors precedent saving logic to use batch operations and adds transaction management |
| Precedent.java | Adds LOB annotation to caseNumber field for handling large text data |
| PrecedentSearchRequestDto.java | Adds Swagger documentation annotations for API schema |
| PrecedentController.java | Updates request mapping and adds API operation documentation |
| LawWordService.java | New service for fetching and caching law term definitions from external API |
| LawWordRepository.java | New repository interface for law word entities |
| LawWord.java | New entity representing law terms and their definitions |
| LawWordController.java | New controller providing law term search endpoint |
| LawSearchRequestDto.java | Adds comprehensive Swagger documentation for all fields |
| LawController.java | Refactors endpoints and adds API documentation |
| drop.sql | Database cleanup script for development environment |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| package com.ai.lawyer.domain.lawWord.controller; | ||
|
|
||
| import com.ai.lawyer.domain.lawWord.service.LawWordService; | ||
| import com.ai.lawyer.domain.precedent.entity.Precedent; |
Copilot
AI
Sep 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import is unused in the controller. Remove the unused import statement.
| import com.ai.lawyer.domain.precedent.entity.Precedent; |
|
|
||
|
|
||
| @PostMapping("/search") | ||
| @Operation(summary = "볍령 목록 검색 기능", description = "조건에 맞는 법령 목록을 가져옵니다") |
Copilot
AI
Sep 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are typos in the Korean text. '볍령' should be '법령' in both operation summaries.
| } | ||
|
|
||
| @GetMapping("/{id}") | ||
| @Operation(summary = "볍령 상세 조회 기능", description = "법령 상세 데이터를 조회합니다 \n" + |
Copilot
AI
Sep 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are typos in the Korean text. '볍령' should be '법령' in both operation summaries.
| precedentRepository.saveAll(precedents); | ||
| precedentRepository.flush(); // 즉시 DB 반영 | ||
| entityManager.clear(); // 영속성 컨텍스트 정리 | ||
|
|
||
| return savedPrecedents; | ||
| return precedents; |
Copilot
AI
Sep 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new implementation removes duplicate checking that was present in the commented code. This could lead to constraint violations if duplicate precedents are saved. Consider adding duplicate checking logic or ensuring uniqueness at the database level.
DooHyoJeong
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good
📌 feat[law-word]:법령 검색 기능 추가
✅ 작업 내용